<!DOCTYPE html>
<html class="no-js">
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1" charset="UTF-8">
    <title>typeArguments</title>
    <link href="../../../images/logo-icon.svg" rel="icon" type="image/svg">
    <script>var pathToRoot = "../../../";</script>
    <script>document.documentElement.classList.replace("no-js","js");</script>
    <script>const storage = localStorage.getItem("dokka-dark-mode")
    if (storage == null) {
        const osDarkSchemePreferred = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches
        if (osDarkSchemePreferred === true) {
            document.getElementsByTagName("html")[0].classList.add("theme-dark")
        }
    } else {
        const savedDarkMode = JSON.parse(storage)
        if(savedDarkMode === true) {
            document.getElementsByTagName("html")[0].classList.add("theme-dark")
        }
    }
    </script>
<script type="text/javascript" src="https://unpkg.com/kotlin-playground@1/dist/playground.min.js" async="async"></script>
<script type="text/javascript" src="../../../scripts/sourceset_dependencies.js" async="async"></script>
<link href="../../../styles/style.css" rel="Stylesheet">
<link href="../../../styles/main.css" rel="Stylesheet">
<link href="../../../styles/prism.css" rel="Stylesheet">
<link href="../../../styles/logo-styles.css" rel="Stylesheet">
<link href="../../../styles/font-jb-sans-auto.css" rel="Stylesheet">
<script type="text/javascript" src="../../../scripts/clipboard.js" async="async"></script>
<script type="text/javascript" src="../../../scripts/navigation-loader.js" async="async"></script>
<script type="text/javascript" src="../../../scripts/platform-content-handler.js" async="async"></script>
<script type="text/javascript" src="../../../scripts/main.js" defer="defer"></script>
<script type="text/javascript" src="../../../scripts/prism.js" async="async"></script>
<script type="text/javascript" src="../../../scripts/symbol-parameters-wrapper_deferred.js" defer="defer"></script>
</head>
<body>
    <div class="root">
<nav class="navigation" id="navigation-wrapper">
    <div class="navigation--inner">
        <div class="navigation-title">
            <button class="menu-toggle" id="menu-toggle" type="button">toggle menu</button>
            <div class="library-name">
                    <a class="library-name--link" href="../../../index.html">
                            Konsist 0.17.0
                    </a>
            </div>
            <div class="library-version">
            </div>
        </div>
        <div class="filter-section" id="filter-section">
                <button class="platform-tag platform-selector jvm-like" data-active="" data-filter=":lib:dokkaHtml/main">jvm</button>
        </div>
    </div>
    <div class="navigation-controls">
        <button class="navigation-controls--btn navigation-controls--theme" id="theme-toggle-button" type="button">switch theme</button>
        <div class="navigation-controls--btn navigation-controls--search" id="searchBar" role="button">search in API</div>
    </div>
</nav>
        <div id="container">
            <div class="sidebar" id="leftColumn">
                <div class="sidebar--inner" id="sideMenu"></div>
            </div>
            <div id="main">
<div class="main-content" data-page-type="member" id="content" pageIds="Konsist 0.17.0::com.lemonappdev.konsist.api.provider/KoTypeArgumentProvider/typeArguments/#/PointingToDeclaration//1440829338">
  <div class="breadcrumbs"><a href="../../../index.html">Konsist 0.17.0</a><span class="delimiter">/</span><a href="../index.html">com.lemonappdev.konsist.api.provider</a><span class="delimiter">/</span><a href="index.html">KoTypeArgumentProvider</a><span class="delimiter">/</span><span class="current">typeArguments</span></div>
  <div class="cover ">
    <h1 class="cover"><span>type</span><wbr></wbr><span><span>Arguments</span></span></h1>
  </div>
  <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-dependent-content" data-active="" data-togglable=":lib:dokkaHtml/main"><div class="symbol monospace"><span class="token keyword">abstract </span><span class="token keyword">val </span><a href="type-arguments.html">typeArguments</a><span class="token operator">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html">List</a><span class="token operator">&lt;</span><a href="../../com.lemonappdev.konsist.api.declaration/-ko-type-argument-declaration/index.html">KoTypeArgumentDeclaration</a><span class="token operator">&gt;</span><span class="token operator">?</span></div><p class="paragraph">A list of type arguments associated with this declaration, if any. If there are no type arguments, this returns <code class="lang-kotlin">null</code>.</p><p class="paragraph">Type arguments are used to specify concrete types for generic type parameters. They appear within angle brackets <code class="lang-kotlin">&lt;&gt;</code> after a generic type name. Every type argument may contain nested type arguments (<code class="lang-kotlin">typeArguments</code> property).</p><ol><li><p class="paragraph">In <code class="lang-kotlin">List&lt;String&gt;</code>, <code class="lang-kotlin">String</code> is a type argument for <code class="lang-kotlin">List</code>.</p></li><li><p class="paragraph">In <code class="lang-kotlin">Map&lt;String, Int&gt;</code>, both <code class="lang-kotlin">String</code> and <code class="lang-kotlin">Int</code> are type arguments for <code class="lang-kotlin">Map</code>.</p></li><li><p class="paragraph">In <code class="lang-kotlin">List&lt;Set&lt;String&gt;&gt;</code>, <code class="lang-kotlin">Set&lt;String&gt;</code> is a type argument for <code class="lang-kotlin">List</code>. It has a nested type argument <code class="lang-kotlin">String</code>.</p></li><li><p class="paragraph">For a non-generic type like <code class="lang-kotlin">String</code>, this property would return <code class="lang-kotlin">null</code>.</p></li></ol><p class="paragraph">Kotlin snippet:</p><div class="sample-container"><pre><code class="block lang-kotlin" theme="idea">val sampleProperty: Map&lt;String, Int&gt; = emptyList()</code></pre><span class="top-right-position"><span class="copy-icon"></span><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div><p class="paragraph">Konsist:</p><div class="sample-container"><pre><code class="block lang-kotlin" theme="idea">Konsist<br>    scopeFromProject()<br>    .properties()<br>    .first()<br>    .type<br>    ?.typeArguments<br>    ?.map { it.name } // listOf(&quot;String&quot;, &quot;Int&quot;)</code></pre><span class="top-right-position"><span class="copy-icon"></span><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div><p class="paragraph">The flattened list of type arguments can be obtained using the <code class="lang-kotlin">flatten</code> extension function:</p><p class="paragraph">Kotlin snippet:</p><div class="sample-container"><pre><code class="block lang-kotlin" theme="idea">val sampleProperty: List&lt;String, Map&lt;Int, Boolean&gt;&gt; = emptyList()</code></pre><span class="top-right-position"><span class="copy-icon"></span><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div><p class="paragraph">Konsist:</p><div class="sample-container"><pre><code class="block lang-kotlin" theme="idea">Konsist<br>    scopeFromProject()<br>    .properties()<br>    .first()<br>    .type<br>    .typeArguments // listOf(&quot;String&quot;, &quot;Map&lt;Int, Boolean&gt;&quot;)<br>    .flatten() // listOf(&quot;String&quot;, &quot;Map&quot;, &quot;Int&quot;, &quot;Boolean&quot;)</code></pre><span class="top-right-position"><span class="copy-icon"></span><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div><span class="kdoc-tag"><h4 class="">Return</h4><p class="paragraph">A list of <a href="../../com.lemonappdev.konsist.api.declaration/-ko-type-argument-declaration/index.html">KoTypeArgumentDeclaration</a> representing the type arguments,     or <code class="lang-kotlin">null</code> if there are no type arguments.</p></span><h4 class="">See also</h4><div class="table"><div class="table-row" data-filterable-current=":lib:dokkaHtml/main" data-filterable-set=":lib:dokkaHtml/main"><div class="main-subrow keyValue "><div class=""><span class="inline-flex"><div><a href="num-type-arguments.html"><span>Ko</span><wbr></wbr><span>Type</span><wbr></wbr><span>Argument</span><wbr></wbr><span>Provider.</span><wbr></wbr><span>num</span><wbr></wbr><span>Type</span><wbr></wbr><span><span>Arguments</span></span></a></div></span></div><div></div></div></div></div></div></div>
</div>
      <div class="footer">
        <span class="go-to-top-icon"><a href="#content" id="go-to-top-link"></a></span><span>© 2024 Copyright</span><span
                class="pull-right"><span>Generated by </span><a
                href="https://github.com/Kotlin/dokka"><span>dokka</span><span class="padded-icon"></span></a></span>
      </div>
            </div>
        </div>
    </div>
</body>
</html>
